﻿#include "adapter.h"
#include <iostream>

JsonInfo::~JsonInfo()
{
}

std::string JsonInfo::request() const
{
    return "some json information";
}

std::string XmlInfo::specialRequest() const
{
    return "some xml information";
}

XmlJsonAdapter::XmlJsonAdapter(XmlInfo *info): m_adaptee(info)
{
}

std::string XmlJsonAdapter::request() const
{
    std::string str = m_adaptee->specialRequest();
    return "json<-XmlJsonAdapter<-" + str;
}
